package com.cn.intelligence.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cn.intelligence.pojo.Salerate;
import com.cn.intelligence.pojo.TaotaoResult;
import com.cn.intelligence.service.SalerateService;

@Controller
@RequestMapping("/sale/")
public class SalerateController {

	//注入service层
	@Autowired
	SalerateService salerateService;
	/**
	 * 查询当前的有效折扣利率
	 */
	@RequestMapping("selectSaleRate")
	@ResponseBody
	public TaotaoResult selectSaleRate(){
		Salerate salerate = salerateService.selectByExample();
		return TaotaoResult.ok(salerate);
	}
	
}
